package com.hospital.ssm.service.serviceimpl;

import com.hospital.ssm.mapper.MedicineMapper;
import com.hospital.ssm.model.Medicine;
import com.hospital.ssm.service.MedicineService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author King
 * @create 2021-01-26-11:40
 * 药品实现类
 */
@Service
public class MedicineServiceImpl implements MedicineService {

    @Autowired
    private MedicineMapper medicineMapper;

    @Override
    public List<Medicine> queryAll() throws Exception {
        return medicineMapper.queryAll();
    }

    @Override
    public int addMedicine(Medicine medicine) throws Exception {
        return medicineMapper.addMedicine(medicine);
    }

    @Override
    public int delMedicine(Integer mId) throws Exception {
        return medicineMapper.delMedicine(mId);
    }

    @Override
    public int updMedicine(Medicine medicine) throws Exception {
        return medicineMapper.updMedicine(medicine);
    }
}